<?php
require_once WEB_MODEL_DIR . DIRECTORY_SEPARATOR . 'DAO' . DIRECTORY_SEPARATOR . 'GameMessageDAO.php';

class GameMessageService {
  
	public function countGameMessTPG($context, $result) {
        $total = 0;
        try {
            $gameMessageDAO = new GameMessageDAO($context);

            $total = $gameMessageDAO -> countGameMessTPG();

        } catch (Exception $e) {
            $result -> setException($e);
            $context -> logException($e);
        }
        return $total;
    }
    
	public function countGameMessCGMB($context, $result) {
        $total = 0;
        try {
            $gameMessageDAO = new GameMessageDAO($context);

            $total = $gameMessageDAO -> countGameMessCGMB();

        } catch (Exception $e) {
            $result -> setException($e);
            $context -> logException($e);
        }
        return $total;
    }
    
	public function countGameMessMMBG($context, $result) {
        $total = 0;
        try {
            $gameMessageDAO = new GameMessageDAO($context);

            $total = $gameMessageDAO -> countGameMessMMBG();

        } catch (Exception $e) {
            $result -> setException($e);
            $context -> logException($e);
        }
        return $total;
    }
    
	public function countGameMessNSGT($context, $result) {
        $total = 0;
        try {
            $gameMessageDAO = new GameMessageDAO($context);

            $total = $gameMessageDAO -> countGameMessNSGT();

        } catch (Exception $e) {
            $result -> setException($e);
            $context -> logException($e);
        }
        return $total;
    }
    
	public function getGameMessByIDTPG($context, $result, $id) {
        $gameMessageArr = null;
        try {
            $gameMessageDAO = new GameMessageDAO($context);

            $gameMessageArr = $gameMessageDAO -> getGameMessByIDTPG($id);

        } catch (Exception $e) {
            $result -> setException($e);
            $context -> logException($e);
        }
        return $gameMessageArr;
    }
    
	public function getGameMessByIDCGMB($context, $result, $id) {
        $gameMessageArr = null;
        try {
            $gameMessageDAO = new GameMessageDAO($context);

            $gameMessageArr = $gameMessageDAO -> getGameMessByIDCGMB($id);

        } catch (Exception $e) {
            $result -> setException($e);
            $context -> logException($e);
        }
        return $gameMessageArr;
    }
    
	public function getGameMessByIDMMBG($context, $result, $id) {
        $gameMessageArr = null;
        try {
            $gameMessageDAO = new GameMessageDAO($context);

            $gameMessageArr = $gameMessageDAO -> getGameMessByIDMMBG($id);

        } catch (Exception $e) {
            $result -> setException($e);
            $context -> logException($e);
        }
        return $gameMessageArr;
    }
    
	public function getGameMessByIDNSGT($context, $result, $id) {
        $gameMessageArr = null;
        try {
            $gameMessageDAO = new GameMessageDAO($context);

            $gameMessageArr = $gameMessageDAO -> getGameMessByIDNSGT($id);

        } catch (Exception $e) {
            $result -> setException($e);
            $context -> logException($e);
        }
        return $gameMessageArr;
    }
    
	public function getAllGameMessByLimitTPG($context, $result, $start, $limit) {
        $gameMessageArr = null;
        try {
            $gameMessageDAO = new GameMessageDAO($context);

            $gameMessageArr = $gameMessageDAO -> getAllGameMessByLimitTPG($start, $limit);

        } catch (Exception $e) {
            $result -> setException($e);
            $context -> logException($e);
        }
        return $gameMessageArr;
    }
    
	public function getAllGameMessByLimitCGMB($context, $result, $start, $limit) {
        $gameMessageArr = null;
        try {
            $gameMessageDAO = new GameMessageDAO($context);

            $gameMessageArr = $gameMessageDAO -> getAllGameMessByLimitCGMB($start, $limit);

        } catch (Exception $e) {
            $result -> setException($e);
            $context -> logException($e);
        }
        return $gameMessageArr;
    }
    
	public function getAllGameMessByLimitMMBG($context, $result, $start, $limit) {
        $gameMessageArr = null;
        try {
            $gameMessageDAO = new GameMessageDAO($context);

            $gameMessageArr = $gameMessageDAO -> getAllGameMessByLimitMMBG($start, $limit);

        } catch (Exception $e) {
            $result -> setException($e);
            $context -> logException($e);
        }
        return $gameMessageArr;
    }
    
	public function getAllGameMessByLimitNSGT($context, $result, $start, $limit) {
        $gameMessageArr = null;
        try {
            $gameMessageDAO = new GameMessageDAO($context);

            $gameMessageArr = $gameMessageDAO -> getAllGameMessByLimitNSGT($start, $limit);
        } catch (Exception $e) {
            $result -> setException($e);
            $context -> logException($e);
        }
        return $gameMessageArr;
    }  	
    
    public function getAllGameMessByGameCateIDTPG($context, $result,$id) {
        $gameMessageArr = null;
        try {
            $gameMessageDAO = new GameMessageDAO($context);

            $gameMessageArr = $gameMessageDAO -> getAllGameMessByGameCateIDTPG($id);
        } catch (Exception $e) {
            $result -> setException($e);
            $context -> logException($e);
        }
        return $gameMessageArr;
    }  	
    
    public function getAllGameMessByGameCateIDCGMB($context, $result,$id) {
        $gameMessageArr = null;
        try {
            $gameMessageDAO = new GameMessageDAO($context);

            $gameMessageArr = $gameMessageDAO -> getAllGameMessByGameCateIDCGMB($id);
        } catch (Exception $e) {
            $result -> setException($e);
            $context -> logException($e);
        }
        return $gameMessageArr;
    }  	
    
    public function getAllGameMessByGameCateIDMMBG($context, $result, $id) {
        $gameMessageArr = null;
        try {
            $gameMessageDAO = new GameMessageDAO($context);

            $gameMessageArr = $gameMessageDAO -> getAllGameMessByGameCateIDMMBG($id);
        } catch (Exception $e) {
            $result -> setException($e);
            $context -> logException($e);
        }
        return $gameMessageArr;
    }  	
    
    public function getAllGameMessByGameCateIDNSGT($context, $result, $id) {
        $gameMessageArr = null;
        try {
            $gameMessageDAO = new GameMessageDAO($context);

            $gameMessageArr = $gameMessageDAO -> getAllGameMessByGameCateIDNSGT($id);
        } catch (Exception $e) {
            $result -> setException($e);
            $context -> logException($e);
        }
        return $gameMessageArr;
    }

	public function insertGameMessage($context, $result, $param) {
        try {

            $gameMessageDAO = new GameMessageDAO($context);

            $gameMessageDAO -> insertGameMessage($param);
        } catch (Exception $e) {
            $result -> setException($e);
            $context -> logException($e);
        }
    }
    
	public function insertGameMessageMMBG($context, $result, $param) {
        try {

            $gameMessageDAO = new GameMessageDAO($context);

            $gameMessageDAO -> insertGameMessageMMBG($param);
        } catch (Exception $e) {
            $result -> setException($e);
            $context -> logException($e);
        }
    }
    
	public function updateGameMessageTPG($context, $result, $param) {
        try {

            $gameMessageDAO = new GameMessageDAO($context);

            $gameMessageDAO -> updateGameMessageTPG($param);
        } catch (Exception $e) {
            $result -> setException($e);
            $context -> logException($e);
        }
    }
    
	public function updateGameMessageCGMB($context, $result, $param) {
        try {

            $gameMessageDAO = new GameMessageDAO($context);

            $gameMessageDAO -> updateGameMessageCGMB($param);
        } catch (Exception $e) {
            $result -> setException($e);
            $context -> logException($e);
        }
    }
    
	public function updateGameMessageMMBG($context, $result, $param) {
        try {

            $gameMessageDAO = new GameMessageDAO($context);

            $gameMessageDAO -> updateGameMessageMMBG($param);
        } catch (Exception $e) {
            $result -> setException($e);
            $context -> logException($e);
        }
    }
    
	public function updateGameMessageNSGT($context, $result, $param) {
        try {

            $gameMessageDAO = new GameMessageDAO($context);

            $gameMessageDAO -> updateGameMessageNSGT($param);
        } catch (Exception $e) {
            $result -> setException($e);
            $context -> logException($e);
        }
    }
    
	public function deleteGameMessageTPG($context, $result, $id) {
        try {

            $gameDAO = new GameMessageDAO($context);

            $gameDAO -> deleteGameMessageTPG($id);
        } catch (Exception $e) {
            $result -> setException($e);
            $context -> logException($e);
        }
    }
    
	public function deleteGameMessageCGMB($context, $result, $id) {
        try {

            $gameDAO = new GameMessageDAO($context);

            $gameDAO -> deleteGameMessageCGMB($id);
        } catch (Exception $e) {
            $result -> setException($e);
            $context -> logException($e);
        }
    }
    
	public function deleteGameMessageMMBG($context, $result, $id) {
        try {

            $gameDAO = new GameMessageDAO($context);

            $gameDAO -> deleteGameMessageMMBG($id);
        } catch (Exception $e) {
            $result -> setException($e);
            $context -> logException($e);
        }
    }
    
	public function deleteGameMessageNSGT($context, $result, $id) {
        try {

            $gameDAO = new GameMessageDAO($context);

            $gameDAO -> deleteGameMessageNSGT($id);
        } catch (Exception $e) {
            $result -> setException($e);
            $context -> logException($e);
        }
    }
    
	public function deleteGameLinkNSGT($context, $result, $id) {
        try {

            $gameDAO = new GameLinkDAO($context);

            $gameDAO -> deleteGameLinkNSGT($id);
        } catch (Exception $e) {
            $result -> setException($e);
            $context -> logException($e);
        }
    }
    
	public function deleteGameLinkMobile($context, $result, $id) {
        try {

            $gameDAO = new GameLinkDAO($context);

            $gameDAO -> deleteGameLinkMobile($id);
        } catch (Exception $e) {
            $result -> setException($e);
            $context -> logException($e);
        }
    }
    
	public function deleteGameLinkTPG($context, $result, $id) {
        try {

            $gameDAO = new GameLinkDAO($context);

            $gameDAO -> deleteGameLinkTPG($id);
        } catch (Exception $e) {
            $result -> setException($e);
            $context -> logException($e);
        }
    }
    
	public function deleteGameLinkMMBG($context, $result, $id) {
        try {

            $gameDAO = new GameLinkDAO($context);

            $gameDAO -> deleteGameLinkMMBG($id);
        } catch (Exception $e) {
            $result -> setException($e);
            $context -> logException($e);
        }
    }
    
	public function deleteGameLinkCGMB($context, $result, $id) {
        try {

            $gameDAO = new GameLinkDAO($context);

            $gameDAO -> deleteGameLinkCGMB($id);
        } catch (Exception $e) {
            $result -> setException($e);
            $context -> logException($e);
        }
    }
    
}
?>